package ui;

import java.awt.Image;
import java.awt.Toolkit;
import java.util.LinkedList;

import network.Group;


public class GroupEntry extends Group {
	

	private static final long serialVersionUID = -6319779791406135498L;

	protected static final Image IMG_GROUP = Toolkit.getDefaultToolkit().getImage("src/images/group_small.png");
	
	public GroupEntry(String name, LinkedList<BuddyEntry> list) {
		super(name);
		if (list != null)
		for(BuddyEntry b:list)
			super.addBuddy(b);
		
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null || !(obj instanceof GroupEntry))
			return false;
		
		GroupEntry other = (GroupEntry) obj;
		if (this.getName() == other.getName() || this.getName().equals(other.getName()))
				return true;
		else 
			return false;
	}


}